import request from '@/utils/http.js';

export const queryPetsByPageAPI = (params) => {
    return request({
        url: '/pet/page',
        method: 'POST',
        data: params
    })
}

export const getPetDetailAPI = (petId) => {
    return request({
        url: `/pet/getPetDetail/${petId}`,
        method: 'GET',
    })
}

export const editPetAPI = (params) => {
    return request({
        url: '/pet/update',
        method: 'POST',
        data: params
    })
}

export const addPetAPI = (params) => {
    return request({
        url: '/pet/addPet',
        method: 'POST',
        data: params
    })
}

// 获取所有宠物品种列表
export const getBreedListAPI = () => {
    return request({
      url: '/pet/breed/list',
      method: 'get'
    });
  };

export const deletePetAPI = (petId) => {
    return request({
        url: `/pet/delPet/${petId}`,
        method: 'POST',
    })
}